<?php
define('MODULE_PATH', APP_PATH.'admin/');
define('MODULE_URL', SITE_URL.'admin.php');
require(LIB_PATH.'core.php');
if (isset($_POST[session_name()])) {
	$_COOKIE[session_name()] = $_POST[session_name()];
}
session_start();
$user = new XA_User();

$action = xa_in::symbol($_GET['action'], 'home');

if (!$user->id && ($action !== 'login_handle')) {
	$action = 'login';
}

require(file_exists(MODULE_PATH.'actions/'.$action.'.php') ? MODULE_PATH.'actions/'.$action.'.php' : MODULE_PATH.'actions/404.php');
